import requests

r = requests.get('https://api.github.com/events')
print(r.json())
print(r.text)
print(r.encoding)

r = requests.post('http://httpbin.org/post', data = {'key':'value'})
print(r.text)

payload = {'key1': 'value1', 'key2': 'value2'}
r = requests.get('http://httpbin.org/get', params=payload)
print(r.url) # http://httpbin.org/get?key1=value1&key2=value2